package com.sg.business.visualization.labelprovider;

import com.sg.business.model.DummyModel;
import com.sg.widgets.commons.labelprovider.ConfiguratorColumnLabelProvider;

public class ProfitRatioLabelProvider extends ConfiguratorColumnLabelProvider {

	@Override
	public String getText(Object element) {
		if (element instanceof DummyModel) {
			DummyModel dummyModel = (DummyModel) element;
			Object value = dummyModel.getValue("profit_ratio");
			if (value != null) {
				return Double.toString((double)value) + "%";
			}
		}
		return "N/A";
	}
}
